home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 August / Macworld (1999-08).dmg / From Macworld Readers / FREE Scripts / FREE Guides / FREE Guide Macintosh / FREE Guide • Macintosh 3.1.sea / FREE Guide • Macintosh 3.1.rsrc / TEXT_149.txt < prev    next >
Text File  |  1998-12-04  |  18KB  |  432 lines

  1.  
  2.  
  3.  
  4.  
  5. FILES IN DETAIL
  6.  
  7.  
  8.  
  9. ¬†              All the items on your desktop, including applications, documents and folders, 
  10.                originate as blocks of data on your disk drive. These blocks are organised by the 
  11.                directory, an invisible file which also contains extra information about each file.
  12.  
  13.  
  14.  
  15. File Components
  16. qqqqqqqqqqqqq
  17.  
  18. Contrary to appearances, a typical file on a hard disk actually consists of three or more separate files. They include the resource and data forks (two separate files with the same name) and a header inside the invisible directory file. The latter also contains pointers that direct the processor to the disk locations for the resource and data forks. 
  19.  
  20. The directory also points to icons for each file (originating from the relevant application‚Äôs resource fork) that are stored in the Desktop file (also invisible) and cross-referred using the file‚Äôs Type and Creator codes. And all of these files can be split into further parts when the drive becomes fragmented ‚Äî it‚Äôs amazing it works at all!
  21.  
  22.  
  23.  
  24. The Resource Fork
  25. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  26.  
  27. This part of a file, unique to Macintosh files, contains things that do something, such as fonts, icons, pictures, menus, and programming code. All applications have a resource fork, usually without a data fork. Resource forks are highly standardised and can be easily modified with a utility such as ResEdit.
  28.  
  29. √π See the Using ResEdit chapter for how to use ResEdit
  30.  
  31.  
  32.  
  33. The Data Fork
  34. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  35.  
  36. This part of a file is similar to files used on non-Mac computers. It usually contains text, graphics or other data that you‚Äôve created. Most documents have a data fork, usually without a resource fork (although some documents may only contain a resource fork). The data fork is usually only understood by the application that created it. Even so, utilities such as CanOpener can extract useful material from almost any file.
  37.  
  38.  
  39.  
  40. File Headers
  41. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  42.  
  43. This component, kept in the drive‚Äôs directory file, contains general information about a file, such as its filename, Type code, Creator code, dates and size, some of which appear in the Finder‚Äôs Get Info window.
  44.  
  45. The four-letter Type and Creator codes carried by each file identify its purpose. The Type defines the contents of a file whilst the Creator indicates which application was used to make the file. The filename can contain up to 31 characters. 
  46.  
  47. When you modify or save a file, the Mac updates the file‚Äôs Modified date. If you only make a minor change, such as moving or copying the file, or modifying it‚Äôs filename or attributes, the date remains unchanged.
  48.  
  49.  
  50.  
  51.  
  52. File Categories
  53. qqqqqqqqqqq
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Most files are applications or their associated documents. Desk accessories (DAs) are a kind of specialised application whose memory allocation is fixed at 20 K. Other files include:-
  62.  
  63.  
  64. Special Files
  65. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  66.  
  67. ¬†              The System Folder contains special files used by the system, Finder and other 
  68.                applications. These include extensions and control panels ‚Äî or preferences              
  69.                created by the applications or control panels themselves.
  70.  
  71.  
  72.  
  73. Aliases
  74. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  75.  
  76. An alias is a file, occupying just a few K of disk space, that points towards another file.
  77. Aliases should always be used in the Apple Menu Items, Launcher, Startup Items and Shutdown Items folders. An alias of a network file helps you avoid too many dialogs.
  78.  
  79.  
  80.  
  81. Clippings
  82. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  83.  
  84. ¬†             A clipping is created when you drag and drop an item onto the Desktop. It can 
  85.               contain text, graphics or a sound (but not a combination of these) and can be 
  86.               viewed in the Finder ‚Äî just select Copy to move the contents to the Clipboard.
  87.  
  88. √î  A clipping is opened without an application ‚Äî so it doesn‚Äôt use much memory!
  89.  
  90.  
  91.  
  92.  
  93. Invisible Files
  94. qqqqqqqqqq
  95.  
  96.  
  97. ¬†            There are several invisible files on your hard disk. You can make any of these 
  98.              files visible, apart from the directory, by using a utility such as File Typer.
  99.              Examples of invisible files include:-
  100.  
  101.  
  102.  
  103. Folder Custom Icons
  104. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  105.  
  106. Although apparently integrated with the folder they adorn, these are actually invisible icon files that reside inside the folder itself. 
  107.  
  108. √π  See the Other Desktop Items chapter for details about icons
  109.  
  110.  
  111.  
  112. Desktop, Desktop DB and Desktop DF Files 
  113. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  114.  
  115. These files, resident on each of your drives, are used to locate documents and their associated applications. On a diskette only the Desktop file is used.
  116.  
  117. Newly installed applications are added to the Desktop DB (database) file at shutdown, but not if you just turn off the machine! The database always remembers applications that you‚Äôve removed. It‚Äôs reconstructed, taking account of all available applications, when you rebuild the Desktop ‚Äî usually by holding down ‚Ć-Option during startup.
  118.  
  119. √à     If you think that any desktop file is seriously corrupted you can make it visible, using a 
  120.         utility such as FileTyper, put it in the Trash, and then rebuild the Desktop ‚Äî or you can 
  121.         use File Buddy to do this automatically.
  122.  
  123. √à     If you delete the Desktop DB file all Get Info comments will be lost.
  124.  
  125.  
  126.  
  127. Shutdown Check File
  128. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  129.  
  130. This file contains a record of whether the last shutdown was executed correctly. If not, you‚Äôll get a warning message when you restart ‚Äî but not if Shut Down Warning is disabled in the General Controls control panel!
  131.  
  132.  
  133.  
  134. Directory
  135. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  136.  
  137. This is a table of contents for your hard disk, recorded in a special area of the disk. It consists of a Catalogue Balanced Tree (or B-Tree) that has a symmetrical shape.
  138.  
  139. To locate a file the Mac follows a path from the root node (the directory itself) via the index nodes (sub directories) on a number of levels, to the leaf node (the physical location of the file). If a file is fragmented into more than three parts a separate Extents B-Tree is used to keep a record of their locations on the disk.
  140.  
  141. The directory also stores what you see in the Get Info window for a file.
  142.  
  143. √à     Disk tools, such Norton Utilities or MacTools, can check or repair the Directory.
  144.  
  145.  
  146.  
  147.  
  148. File Types
  149. qqqqqqq
  150.  
  151.  
  152. ¬†             Each Mac file has a four-letter Type code that defines its contents ‚Äî for example, 
  153.                all text files, whatever the application created them, have a Type of TEXT. An 
  154.                application uses these file Types to recognise those files it can open.
  155.  
  156. Some file Types can only be opened by a particular application. Others are generic files that are acceptable to several different applications. Examples of the latter include:-
  157.  
  158.  
  159.                 Type     Matching Applications                     
  160.  
  161.                 TEXT     Word Processing
  162.                  PICT      Graphics
  163.                 APPL       Finder or Finder substitute
  164.  
  165.  
  166. √à     APPL is the Type code given to a file containing any application. 
  167.  
  168. √à     If you give a file a Type that doesn‚Äôt match its contents the relevant application will still 
  169.         try to read it ‚Äî the results can be unpredictable!
  170.  
  171.  
  172.  
  173. Common Types
  174. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  175.  
  176. Frequently encountered Types include:-
  177.  
  178.  
  179. Finder                                                                                                                   
  180.  
  181.               APPL        Application 
  182.               FNDR        Finder
  183.               zsys        System
  184.               cdev        Control Panel
  185.               INIT        Extension
  186.               FFIL        Font
  187.               dfil        Desk Accessory
  188.               sfil        Sound
  189.  
  190. Generic                                                                                                                 
  191.  
  192.               EPSF     Encapsulated PostScript
  193.               PICT        QuickDraw picture
  194.               GIFf     Graphic Interchange File
  195.               TEXT     Text
  196.        TIFF     Tagged Image File Format
  197.               ttro        Text ‚Äî SimpleText read-only
  198.  
  199. Applications                                                                                                           
  200.  
  201.               drw2     Canvas Image
  202.               CWDB        ClarisWorks database 
  203.               CWGR        ClarisWorks drawing 
  204.               CWPT        ClarisWorks painting 
  205.               CWSS        ClarisWorks spreadsheet 
  206.               CWWP        ClarisWorks word processing
  207.               PACT        Compact Pro archive 
  208.               DDF2        DiskDoubler archive 
  209.               XLS3        Excel 3.x (Microsoft)
  210.               FMPR        FileMaker Pro 
  211.               FHD3        Freehand 3.x (Aldus)
  212.               STAK     HyperCard stack 
  213.               DRWG     MacDraw II document 
  214.               STAT     MacDraw II stationery 
  215.               PNTG     MacPaint
  216.               WORD     MacWrite
  217.               MW2D     MacWrite II document
  218.               MW2S     MacWrite II stationery 
  219.               ALB3     Pagemaker 3.x (Aldus)
  220.               ALB4     Pagemaker 4.x (Aldus)
  221.               LWFN     PostScript font 
  222.               rsrc     ResEdit
  223.               SFIL     SoundMover sound suitcase
  224.               SIT!     Stuffit archive
  225.               SITD     Stuffit Deluxe archive
  226.               SPn3     SuperPaint 3.x image
  227.               WDBN     Word (Microsoft)
  228.               AWWP     Works word processing (Microsoft)
  229.               AWDB     Works database (Microsoft)
  230.               AWSS     Works spreadsheet (Microsoft)
  231.  
  232.  
  233.  
  234.  
  235. File Creators
  236. qqqqqqqqq
  237.  
  238.  
  239. ¬†             A Creator code links a file to it‚Äôs parent application. If the file is an application 
  240.               the Creator refers to itself. For example, all ClarisWorks files and the application 
  241.               itself have a Creator code of BOBO.
  242.  
  243. The Finder uses the code to give a document the correct icon and to launch the relevant application when you double-click on it. If you give a document a new Creator code the Finder is persuaded that the file was created by the new application ‚Äî and it appears with a new icon. The new application will be launched if you double-click on the document.
  244.  
  245. √à     If you change a Creator the file must be of a Type that the application recognises!
  246.  
  247. √à     The Finder doesn‚Äôt try to find the application of any file with a Creator of ????  
  248.       ‚Äî  and it gives it a generic icon based on its Type. 
  249.  
  250.  
  251.  
  252. Common Creators
  253. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  254.  
  255. The following list shows some examples of Creators:-
  256.  
  257.  
  258. System                                                                                                                 
  259.  
  260.               MACS     System software 
  261.               movr        System 7 fonts, desk accessories and sound files
  262.  
  263. Applications                                                                                                          
  264.  
  265.               BOBO     ClarisWorks
  266.               DSTL     Acrobat Distiller
  267.               CARO     Acrobat Reader
  268.               AOqe     America Online
  269.               Arch     Anarchie
  270.               R*ch     BBEdit
  271.               DRD2     Canvas
  272.               MMan     Claris Emailer
  273.               CPCT     Compact Pro
  274.               EXTR     Compact Pro self-extracting archive
  275.               CIM_     CompuServe Information Manager
  276.               prmt     Desktop Print Manager (System application)
  277.               D2CT     Disinfectant
  278.               dCpy     Disk Copy
  279.               DDAP     DiskDoubler
  280.               DSEA     DiskDoubler self-extracting archive
  281.               DkmR     DOCMaker
  282.               Dcmp     DropCompress
  283.               SITC     DropConvert
  284.               DStf     DropStuff
  285.               XCEL     Excel
  286.               CSOm     Eudora
  287.               Δí‚à´√•√ü      File Buddy
  288.               FMPR     FileMaker Pro
  289.               FHA2     Freehand 2.x
  290.               FHA3     Freehand 3.x
  291.               GKON     GraphicConverter
  292.               NvDa     Guide Maker
  293.               WILD     HyperCard
  294.               ARTZ     Illustrator
  295.               ART3     Illustrator 3.x
  296.               ART5     Illustrator 5.x
  297.               JVWR     JPEGView
  298.               MDRW     MacDraw
  299.               MDPL     MacDraw II
  300.               MPNT     MacPaint
  301.               MACA     MacWrite
  302.               MWII     MacWrite II
  303.               MOR2     More
  304.               TVOD     MoviePlayer
  305.               MPS_     MPW
  306.               MOSS     Netscape Navigator
  307.               npdt     Note Pad
  308.               NIC!     Now Contact
  309.               PAD!     Now QuickPad
  310.               ALD4     Pagemaker 4.x
  311.               ALD6     Pagemaker 6.x
  312.               ASPF     PostScript font
  313.               8BIM     Photoshop
  314.               XPR3     QuarkXPress 3.x
  315.               INTU     Quicken
  316.               RCMP     ResCompare
  317.               RSED     ResEdit
  318.               sbkt     Scrapbook
  319.               ToyS     Script Editor (AppleScript)
  320.               Wrap     ShrinkWrap
  321.               ttxt     SimpleText
  322.               notz     Stickies
  323.               SIT!     StuffIt
  324.               SITx     StuffIt Expander
  325.               SMOV     SoundMover
  326.               SPNT     SuperPaint
  327.               KAHL     THINK C
  328.               TBP4     TouchBase Pro 4.x
  329.               JeFF     UULite
  330.               TCPa     Web Browser
  331.               MSWD     Word
  332.               WPC2     Word Perfect
  333.               PSI2     Works 2.x
  334.               ZIP_     ZipIt
  335.  
  336.               _ denotes a space
  337.  
  338.  
  339.  
  340. Pathnames
  341. qqqqqqqq
  342.  
  343.  
  344. A pathname explains the hierarchy of folders on the disk containing a file, such as:- 
  345.  
  346.                                 Hard Disk:Big Folder:Fred‚Äôs:Letter to Harry
  347.  
  348. This is the pathname for the file Letter to Harry which is contained within a folder called Fred‚Äôs which is itself inside a folder called Big Folder on a drive called Hard Disk.
  349.  
  350. √à     The pathname is delineated with colons ‚Äî this means you can‚Äôt use colons in the 
  351.       names for files, folders or drives. If you try the Mac enters a hyphen instead!
  352.  
  353. √à       Hold down √á and click on a Finder‚Äôs window name to see the path of a folder.
  354.  
  355. √à       Some applications can‚Äôt open a file if its total path name exceeds 255 characters.
  356.  
  357.  
  358.  
  359.  
  360. Attributes
  361. qqqqqqq
  362.  
  363.  
  364. Every file has attributes, single bits of data or flags, in the its header that define how the it behaves. Attributes can be enabled or disabled using ResEdit, File Buddy or GetMoreInfo. For example, by checking the Invisible attribute in such a utility, a file can be made invisible.
  365.  
  366. The following file attributes have the effect shown when checked:-
  367.  
  368.  
  369. Invisible                                                                                                                 
  370.  
  371. The file can‚Äôt be seen.
  372.  
  373. Inited                                                                                                                    
  374.  
  375. The file is known to the Finder, which checks this attribute itself whenever it calls on the file. If you change other attributes, such as Invisible, it‚Äôs advisable to also uncheck Inited to to force the Finder to look at it. Utilities such as File Buddy do this automatically.
  376.  
  377. Use Custom Icon                                                                                                       
  378.  
  379. A custom icon is in use ‚Äî this is automatically checked when you paste graphics into the icon box in the Get Info window. Some text or graphics applications create their own custom icon, known as an icon preview, from the contents of a file when it‚Äôs saved.
  380.  
  381. Name Locked                                                                                                          
  382.  
  383. You can‚Äôt change the file‚Äôs name. Certain files in the System Folder won‚Äôt let you to alter their names anyway. 
  384.  
  385. Alias                                                                                                                     
  386.  
  387. The file is an alias. Most aliases are either created by the user or by a Recent feature in a Menu control panel such as MenuChoice or OtherMenu.
  388.  
  389. Stationery                                                                                                              
  390.  
  391. The file is stationery. You can set this by using the check box provided in Get Info. Applications check this automatically whenever a file is  saved as stationery.
  392.  
  393. Shared                                                                                                                       
  394.  
  395. The file is being shared over a network.
  396.  
  397. Has Bundle                                                                                                              
  398.  
  399. The file is able create files of the same Creator. Most applications have this checked.
  400.  
  401. File Locked                                                                                                             
  402.  
  403. The file can‚Äôt be altered, usually set by checking the Locked box in Get Info.
  404.  
  405. No INITS                                                                                                               
  406.  
  407. The file does not contain any elements that modify the system at startup.
  408.  
  409.  
  410.  
  411.  
  412. File Dates
  413. qqqqqqq
  414.  
  415.  
  416. The header in each Mac file keeps a record of the time and date it was created, last modified or last backed up, measured as a number in seconds since January 1st 1904.
  417.  
  418. This number in two parts:-
  419.  
  420.          z  Whole number part ‚Äî left of the decimal point:
  421.               The number of whole days elapsed since January 1st 1904 indicating the date.
  422.  
  423.          z  Fractional part ‚Äî right of the decimal point:
  424.               The remaining part of the given day ‚Äî the actual time of day.
  425.  
  426. When a date number is recalled it‚Äôs converted into a localised format (such as the Roman calendar with years, months, days, hours and seconds) so that we can understand it. This numbering system should last until the year 2040 ‚Äî let‚Äôs hope we see it!
  427.  
  428. The created and modified dates both appear in the Get Info window. The Mac doesn‚Äôt complain if a file‚Äôs creation date is later than the modification date but a test utility such as MacCheck will report it as a problem.
  429.  
  430.  
  431.  
  432. ¬©Ray White. All Rights Reserved 1997